﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NoticeInfo_Edit.aspx.cs" validateRequest="false"
    Inherits="Catering.Catering_Page.system.NoticeInfo_Edit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../../Scripts/zhezhao.js" type="text/javascript"></script>
    <link href="../../Style/zhezhao.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/head.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/center.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/uploader/jquery.uploadify.v2.1.0.min.js"></script>
    <script type="text/javascript" src="../../Scripts/uploader/swfobject.js"></script>
    <link type="text/css" href="../../Scripts/uploader/uploadify.css" rel="stylesheet" />
    <script type="text/javascript" src="../../Scripts/js_bianjiqi/xheditor-1.1.14-zh-cn.min.js"></script>
    <script type="text/javascript">        
        $(document).ready(function () {
            $('#ftxt_Conent').xheditor({
                tools: 'Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,Align,List,Outdent,Indent,Link,Unlink,Img,Preview,Print,Fullscreen',
                skin: 'vista',
                showBlocktag: true,
                internalScript: false,
                internalStyle: false,
                width: 700,
                height: 200,
                fullscreen: false,
                sourceMode: false,
                forcePtag: false,
                upImgUrl: "upload.aspx?immediate=1&FileDir=../../UpFile",
                upImgExt: "jpg,jpeg,gif,png"
            });
        });
    </script>
    <style type="text/css">
        #A_Upload{clear:both; padding-left:90px; line-height:30px; display:none; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>    
    <div style="overflow-y:auto; overflow-x:none; height:404px; padding-bottom:30px;">
    <div style="height: 36px; line-height: 36px; font-size: 13px;"> &nbsp;当前位置：通告维护-<%=m_States %></div>
        <table width="100%" cellpadding="0" cellspacing="5" border="0">
            <tr>
                <td width="45" align="right">
                    标题：
                </td>
                <td>
                    <asp:TextBox ID="txt_Title" runat="server" CssClass="input_bg" Width="400"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right" valign="top">
                    内容：
                </td>
                <td>                    
                    <asp:HiddenField ID="div_hi_id" runat="server" />
                    <asp:HiddenField ID="div_hi_userid" runat="server" />
                    <asp:HiddenField ID="div_hi_time" runat="server" />
                    <asp:HiddenField ID="div_hi_FileName" runat="server" />
                    <%--<FTB:FreeTextBox ID="ftxt_Conent" runat="server" ButtonSet="OfficeMac" EnableHtmlMode="false" Language="zh-CN" ImageGalleryPath="../../Images/NoticeInfo/" ImageGalleryUrl="../../ftb.imagegallery.aspx"  ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu|Cut,Copy,Paste;Undo,Redo,Print|Bold,Italic,Underline,Strikethrough;Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertRule,InsertImageFromGallery" Height="200px" Width="500px">--%>
                    <textarea name="content" id="ftxt_Conent" rows="12" cols="100" runat="server"></textarea>
                    <%--</FTB:FreeTextBox>--%>
                </td>
            </tr>
            <tr>
                <td align="right">
                    附件：
                </td>
                <td>
                    <p id="uploadFileName">
                        <b>
                            <label id="allFileName" runat="server" />
                            <asp:HiddenField ID="HF_FileName" runat="server" />
                        </b>
                    </p>
                </td>
            </tr>
        </table>
        <div style="height:auto;">
            <div style="float:left; padding-left:14px; width:75px; line-height:30px;">上传附件：</div>
            <div style="float:left; max-width:700px; height:auto;"><div id="fileUpload"></div></div>
            <div id="A_Upload">
                <a href="javascript:$('#fileUpload').uploadifyUpload()">上传</a> | <a href="javascript:$('#fileUpload').uploadifyClearQueue()">取消上传</a>
            </div>
        </div>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td colspan="3" height="30">&nbsp;</td>
            </tr>
            <tr>
                <td width="14">&nbsp;</td>
                <td width="100">
                    <asp:LinkButton ID="btnAdd" runat="server" CssClass="input_btn_a" OnClick="btnInfoAdd_Click">提交</asp:LinkButton>
                    <asp:LinkButton ID="btnEdit" runat="server" CssClass="input_btn_a" OnClick="btnEdit_Click" Visible="false">提交</asp:LinkButton>
                    
                </td>
                <td>
                    <a class="input_btn_a" href="<%=m_ReturnURL %>">返回</a>
                </td>
            </tr>
        </table>
    </div>
    </ContentTemplate>
    </asp:UpdatePanel>
    </form>
    <script type="text/javascript">
        var noticeId = $("#div_hi_id").val();
        var reurl = "<%=m_ReturnURL %>";
        if (noticeId == "") {
            noticeId = 0;
        }
        $("#fileUpload").uploadify({
            'uploader': '../../Scripts/uploader/uploadify.swf',
            'method': 'GET',
            'script': 'NoticeInfo_Edit.aspx',
            'cancelImg': '../../Scripts/uploader/cancel.png',
            'buttonText': '选择头像',
            'buttonImg': '../../Scripts/uploader/liulan.png',
            'height': 28,
            'width': 86, 
            'scriptData': { 'EditType': 'upload', 'NoticeID': noticeId, 'ReturnURL': reurl },
            'auto': false,
            'multi': true,
            'simUploadLimit': 1,
            // 'sizeLimit':10240, 
            'onComplete': function (event, queueID, fileObj, response, data) {
                var filelabel = document.getElementById("uploadFileName").innerText;
                if (filelabel && filelabel.length <= 3) $("#uploadFileName").append(fileObj.name);
                else $("#uploadFileName").append("、" + fileObj.name);
                document.getElementById("A_Upload").style.display = "none";
                var fileO = $("#div_hi_FileName").val()
                var json_data = response;
                if (json_data != "") {
                    fileO = fileO + "|" + json_data;
                } else if (json_data == "0") {
                    alert("上传失败!请检查网络情况及文件大小");
                }

                $("#div_hi_FileName").val(fileO);
            },
            'onSelect': function () {
                document.getElementById("A_Upload").style.display = "block";
            },
            'onCancel': function (event, queueId, fileObj, data) {
                if (data.fileCount == 0) document.getElementById("A_Upload").style.display = "none";
            }
        });
    </script>
</body>
</html>
